package io.geekidea.springbootplus.system.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.geekidea.springbootplus.framework.common.entity.BaseEntity;
import io.geekidea.springbootplus.framework.core.validator.groups.Add;
import io.geekidea.springbootplus.framework.core.validator.groups.Update;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.Date;

public class SysMember extends BaseEntity {
    private static final long serialVersionUID = -4274515237611471818L;

    @ApiModelProperty("主键")
    @NotNull(message = "ID不能为空", groups = {Update.class})
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("唯一标识openid")
    @NotNull(message = "openid不能为空", groups = {Add.class})
    private String openid;

    @ApiModelProperty("会员昵称")
    @NotNull(message = "会员昵称不能为空", groups = {Add.class})
    private String nickName;

    @ApiModelProperty("会员姓名")
    @NotNull(message = "会员姓名不能为空", groups = {Add.class})
    private String username;

    @ApiModelProperty("会员密码")
    @NotNull(message = "会员密码不能为空", groups = {Add.class})
    private String password;

    @ApiModelProperty("会员邮箱")
    @NotNull(message = "会员邮箱不能为空", groups = {Add.class})
    private String email;

    @ApiModelProperty("会员手机号")
    @NotNull(message = "会员手机号不能为空", groups = {Add.class})
    private String phone;

    @ApiModelProperty("会员积分")
    @NotNull(message = "会员积分不能为空", groups = {Add.class})
    private Integer integral;

    @ApiModelProperty("折扣")
    @NotNull(message = "折扣不能为空", groups = {Add.class})
    private BigDecimal discount;

    @ApiModelProperty("余额")
    @NotNull(message = "余额不能为空", groups = {Add.class})
    private BigDecimal balance;

    @ApiModelProperty("会员描述")
    private String description;

    @ApiModelProperty("会员卡号")
    private String cardNumber;

    @ApiModelProperty("头像地址")
    private String avatarUrl;

    @ApiModelProperty("会员性别")
    private Integer gender;

    @ApiModelProperty("会员卡号创建时间")
    private Date createTime;
}
